<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>年会抽奖</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="yes" name="apple-touch-fullscreen"/>
    <meta content="telephone=no,email=no" name="format-detection"/>
    <meta content="maximum-dpr=2" name="flexible"/>
    <link rel="stylesheet" href="./css/flexible.css">
    <script src="./js/flexible.js"></script>
    <link rel="stylesheet" href="css/lottery.css">
</head>
<body>

    <div class="lottery-title">
        <img src="images/title.png" alt="">
    </div>
    <div class="phone">
        <img src="./images/phone.png" alt="">
    </div>





<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="./js/lottery.js"></script>
    <script>
        function abc() {
            if (t <= 0) {
                clearTimeout(timer);
                //一定要return，不然下面又创建了新的定时器
                return;
            }
            //遍历当前 所有的 li 并获取下标
            console.log(123455)

            timer = setTimeout("abc()", 100);
        }

        var t= 1;
        timer = '';
        $('.phone').click(function () {

            abc();
        })
        $('.lottery-title').click(function () {
            clearTimeout(timer);
        })
    </script>
</body>
</html>



